<include file="Common/header-bench" />
<div class="row">
    <div class="col-md-12">
        <ul class="nav nav-tabs">
            <li class="active"><a href="{:U('bench/user/profile')}">个人资料</a></li>
        </ul>
    </div>
    <div class="box col-md-12">
        <div class="box-inner">
            <div class="box-header well" data-original-title="">
                <h2><i class="fa fa-edit"></i> 修改个人资料</h2>
            </div>
            <script>
                require(['jquery', 'util'], function($, u){
                    $(function(){
                        $('#theform').submit(function(){
                            var pars = {};
                            var message = '';
                            pars.password = $(':password[name=password]').val();
                            if(!pars.password) {
                                message += '必须输入登录密码 <br>';
                            }
                            if(pars.password != $('#password').val()) {
                                message += '确认密码不一致 <br>';
                            }
                            if(message) {
                                u.message(message);
                                return false;
                            }
                        });
                    });
                });
            </script>
            <div class="box-content">
                <form id="theform" action="" method="post" class="form-horizontal" role="form" onsubmit="return validate();">
                    <div class="form-group">
                        <label class="col-sm-2 control-label">用户名</label>
                        <div class="col-sm-4">
                            <p class="form-control-static">{$user['username']}</p>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-4">
                            <input class="form-control" type="password" name="password" />
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-sm-2 control-label">确认密码</label>
                        <div class="col-sm-4">
                            <input class="form-control" type="password" id="password" />
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-1">
                            <button type="submit" class="btn btn-block btn-primary">保存</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<include file="Common/footer-bench" />
